SOURCES=boot.o main.o monitor.o timer.o gdt.o gdt_flush.o panic.o

CFLAGS=-nostdlib -nostdinc -fno-builtin -m32 -fno-stack-protector
LDFLAGS=-Tlink.ld  --oformat=elf32-i386 -melf_i386
ASFLAGS=-felf

all: $(SOURCES) link

clean:
	-rm *.o kernel

link:
	ld $(LDFLAGS) -o kernel $(SOURCES)

.s.o:
	nasm $(ASFLAGS) $<
